Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / core / data / src / androidMain / kotlin / org / meshtastic / core / data / datasource / BootloaderOtaQuirksJsonDataSourceImpl.kt

Displaying Raw • Download

core/data/src/androidMain/kotlin/org/meshtastic/core/data/datasource/BootloaderOtaQuirksJsonDataSourceImpl.kt 7631db63d0bdff28078438b095c0259306cb6617 (7631db63) Text, 1.76 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.data.datasource

Tff7b72import T7ee787android.app.Application
Tff7b72import T7ee787co.touchlab.kermit.Logger
Tff7b72import T7ee787kotlinx.serialization.ExperimentalSerializationApi
Tff7b72import T7ee787kotlinx.serialization.Serializable
Tff7b72import T7ee787kotlinx.serialization.json.Json
Tff7b72import T7ee787kotlinx.serialization.json.decodeFromStream
Tff7b72import T7ee787org.koin.core.annotation.Single
Tff7b72import T7ee787org.meshtastic.core.model.BootloaderOtaQuirk

Tf0883e@Single
Tff7b72class T56d364BootloaderOtaQuirksJsonDataSourceImplTb4b4b4(Tff7b72private Tff7b72val Te6edf3applicationTb4b4b4: Te6edf3ApplicationTb4b4b4) Tb4b4b4: Te6edf3BootloaderOtaQuirksJsonDataSource Tb4b4b4{
Tf0883e@OptInTb4b4b4(Te6edf3ExperimentalSerializationApiTff7b72::Te6edf3classTb4b4b4)
Tff7b72override Tff7b72fun Td2a8ffloadBootloaderOtaQuirksFromJsonAssetTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3ListTff7b72<Te6edf3BootloaderOtaQuirkTff7b72> Tff7b72= Te6edf3runCatching Tb4b4b4{
Tff7b72val Te6edf3inputStream Tff7b72= Te6edf3applicationTb4b4b4.Te6edf3assetsTb4b4b4.Te6edf3openTb4b4b4(Ta5d6ff"Ta5d6ffdevice_bootloader_ota_quirks.jsonTa5d6ff"Tb4b4b4)
Te6edf3inputStreamTb4b4b4.Te6edf3use Tb4b4b4{ Te6edf3JsonTb4b4b4.Te6edf3decodeFromStreamTff7b72<Te6edf3ListWrapperTff7b72>Tb4b4b4(Tffa657itTb4b4b4)Tb4b4b4.Te6edf3devices Tb4b4b4}
Tb4b4b4}
Tb4b4b4.Te6edf3onFailure Tb4b4b4{ Te6edf3e Tff7b72-Tff7b72> Te6edf3LoggerTb4b4b4.Te6edf3wTb4b4b4(Te6edf3eTb4b4b4) Tb4b4b4{ Ta5d6ff"Ta5d6ffFailed to load device_bootloader_ota_quirks.jsonTa5d6ff" Tb4b4b4} Tb4b4b4}
Tb4b4b4.Te6edf3getOrDefaultTb4b4b4(Te6edf3emptyListTb4b4b4(Tb4b4b4)Tb4b4b4)

Tf0883e@Serializable Tff7b72private Tff7b72data Tff7b72class T56d364ListWrapperTb4b4b4(Tff7b72val Te6edf3devicesTb4b4b4: Te6edf3ListTff7b72<Te6edf3BootloaderOtaQuirkTff7b72> Tff7b72= Te6edf3emptyListTb4b4b4(Tb4b4b4)Tb4b4b4)
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.1s